package com.iwhalecloud.citybrain.flow.platform.manager.domain.repository;

import org.flowable.form.engine.impl.persistence.entity.FormResourceEntity;

/**
 * @author cheng.huaxing
 * @date 2019-02-28
 */
public interface FormResourcePersistRepository {

    /**
     * 添加表单
     *
     * @param formResourceEntity 资源实体
     */
    void insert(FormResourceEntity formResourceEntity);

    /**
     * 查询表单
     * @param processInstanceId
     * @param resourceName
     * @return
     */
    FormResourceEntity find(String processInstanceId, String resourceName);

    /**
     * 查询表单
     * @param formResourceId 表单资源id
     * @return
     */
    FormResourceEntity find(String formResourceId);

    /**
     * 更新表单
     * @param resourceEntity
     */
    void update(FormResourceEntity resourceEntity);
}
